<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>{$title}</h2>
    </div>
    <div style="">
        <span style="display: inline-block;margin-bottom: 8px;font-size: 16px;">产品编号：</span>
        <span style="display: inline-block;margin-bottom: 8px;font-size: 16px;">{$product.p_id|default='--'}</span>
        <span style="display: inline-block;margin-bottom: 8px;font-size: 16px;margin-left: 50px;">产品名称：</span>
        <span style="display: inline-block;margin-bottom: 8px;font-size: 16px;">{$product.name|default='--'}</span>
    </div>
    <form action="" id="form" method="post" enctype="multipart/form-data" class="form-horizontal">
        <div class="form-item">
            <span style="display: inline-block;margin-bottom: 8px;font-size: 16px;">产品logo：</span>
            <if condition="$product.img_url != ''">
                <p><img src="{$product.img_url}" width="100px" height="100px" /></p>
            </if>
        </div>
        <div class="form-item">
            <label class="item-label">生成数量<span style="color: red;">*</span><span class="check-tips">（最大不能超过300）</span></label>
            <div class="controls">
                <input name="num" class="text input-large" value="10">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">批次名称<span style="color: red;">*</span><span class="check-tips">（最多不能超过26个字符，当前为第{$new_pici|default='*'}批）</span></label>
            <div class="controls">
                <input name="pici_name" class="text input-large" value="{$pici_show|default=''}">
            </div>
        </div>
        <div class="form-item" style="margin-bottom:10px;overflow: hidden;">
            <label class="item-label">二维码样式<span style="color: red;">*</span><span class="check-tips">(如下示例)</span></label>
            <div style="float: left;">
                <div style="width: 150px;height: 180px;border: 1px solid #e8e8e8;">
                    <div style="margin-left:15px;margin-top: 15px;background-image: url('./Uploads/QRcode/image/qrcode_example.png');position:relative;display:flex;align-items: center;justify-content: center;width: 120px;height: 120px;background-size: 100% 100%;"></div>
                </div>
                <label style="display: block;height: 30px;text-align: center;line-height: 30px;">
                    <input value="1" name="qrcode_type" type="radio" ><span style="margin-left: 5px;font-size: 14px">无logo</span>
                </label>
            </div>
            <div style="margin-left: 40px;float: left;">
                <div style="width: 150px;height: 180px;border: 1px solid #e8e8e8;">
                    <div style="margin-left:15px;margin-top: 15px;background-image: url('./Uploads/QRcode/image/qrcode_example.png');position:relative;display:flex;align-items: center;justify-content: center;width: 120px;height: 120px;background-size: 100% 100%;">
                        <img src="{$product.img_url}" style="width:36px;height: 36px;">
                    </div>
                </div>
                <label style="display: block;height: 30px;text-align: center;line-height: 30px;">
                    <input value="2" name="qrcode_type" type="radio" ><span style="margin-left: 5px;font-size: 14px">有logo</span>
                </label>
            </div>
            <div style="margin-left: 40px;float: left;">
                <div style="width: 150px;height: 180px;border: 1px solid #e8e8e8;">
                    <div style="margin-left:15px;margin-top: 15px;background-image: url('./Uploads/QRcode/image/qrcode_example.png');position:relative;display:flex;align-items: center;justify-content: center;width: 120px;height: 120px;background-size: 100% 100%;">
                        <img src="{$product.img_url}" style="width:36px;height: 36px;">
                    </div>
                    <p style="margin-left:15px;margin-top:5px;font-size: 12px">{$product.name}</p>
                </div>
                <label style="display: block;height: 30px;text-align: center;line-height: 30px;">
                    <input value="3" name="qrcode_type" type="radio" ><span style="margin-left: 5px;font-size: 14px">产品名称</span>
                </label>
            </div>
            <div style="margin-left: 40px;float: left;">
                <div style="width: 150px;height: 180px;border: 1px solid #e8e8e8;">
                    <div style="margin-left:15px;margin-top: 15px;background-image: url('./Uploads/QRcode/image/qrcode_example.png');position:relative;display:flex;align-items: center;justify-content: center;width: 120px;height: 120px;background-size: 100% 100%;">
                        <img src="{$product.img_url}" style="width:36px;height: 36px;">
                    </div>
                    <p style="margin-left:15px;margin-top:5px;font-size: 12px">{$product.name}-第*批</p>
                </div>
                <label style="display: block;height: 30px;text-align: center;line-height: 30px;">
                    <input value="4" name="qrcode_type" type="radio" ><span style="margin-left: 5px;font-size: 14px">批次名称</span>
                </label>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label"><span style="color: red;">生成过程较慢，请耐心等待~</span></label>
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">生成二维码</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <!-- 引入CSS、JS开始 -->

    <!-- 引入CSS、JS结束 -->
    <script type="text/javascript">
        /* 当前子菜单栏高亮 */
        highlight_subnav('{:U('QRcode/qrcode_product')}');

    </script>
</block>